﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace TCM
{
    public partial class CourseSchedule
    {
         
        [Display(Name = "From Time")]
        [DataType(DataType.Text)]
        public string FromTimeOnly
        {
            get
            {
                if (this.FromTime != null)
                {
                    return this.FromTime.Value.ToShortTimeString();
                }
                return "";
            }
            set
            {

                DateTime dt = DateTime.Parse(value);
                this.FromTime = dt;
            }
        }
        
        
        [Display(Name = "To Time")]
        [DataType(DataType.Text)]
        public string ToTimeOnly
        {
            get
            {
                if (this.ToTime != null)
                {
                    return this.ToTime.Value.ToShortTimeString();
                }
                return "";
            }
            set
            {
                DateTime dt = DateTime.Parse(value);
                this.ToTime = dt;
            }
        }

        [Display(Name = "Day Name")]
        [DataType(DataType.Text)]
        public string DayName
        {
            get;
            set;
        }

        [NotMapped]
        public bool DeletedByUI
        {
            get;
            set;
        }
       
    }
}